package edu.cuit.zhuyimeng.flight.dal.po;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;

/**
 * @TableName flight 航班实体
 */
@TableName(value ="flight")
@Getter
@Schema(name = "Flight", description = "航班实体")
@Builder
public class FlightPO implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(name = "id", description = "航班id")
    private Long id;

    @Schema(name = "number", description = "航班号")
    private String number;

    @Schema(name = "aircraftId", description = "飞机id")
    private Long aircraftId;

    @Schema(name = "startTime", description = "起飞时间")
    private Date startTime;

    @Schema(name = "endTime", description = "到达时间")
    private Date endTime;

    @Schema(name = "deployCity", description = "出发城市")
    private String deployCity;

    @Schema(name = "arrivalCity", description = "到达城市")
    @JsonIgnore
    private String arrivalCity;

    @Schema(name = "startBook", description = "开始订票时间")
    private Date startBook;

    @Schema(name = "endBook", description = "结束订票时间")
    private Date endBook;

    @Schema(name = "price", description = "价格")
    private Integer price;

    @Schema(hidden = true)
    @TableLogic
    @JsonIgnore
    private Integer deleted;

    @Serial
    private static final long serialVersionUID = 1L;
}